/*
 * Copyright 2005-2013 shopxx.net. All rights reserved.
 * Support: http://www.shopxx.net
 * License: http://www.shopxx.net/license
 */
package net.starwifi.duobao.entity;

import javax.persistence.*;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Entity - 刮刮乐活动设置
 * 
 * @author SHOP++ Team
 * @version 3.0
 */
@Entity
@Table(name = "duob_gglhd")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "duob_Gglhd_sequence")
public class Gglhd extends BaseEntity {

	private static final long serialVersionUID = -3950317769006303385L;

	/** 访问路径前缀 */
	//private static final String PATH_PREFIX = "/consultation/content";

	/** 访问路径后缀 */
	private static final String PATH_SUFFIX = ".jhtml";

	private String name; //活动名称
	private String content;//活动内容
	private String bak; //活动备注
	private int status; //活动开启状态 0关闭 1开启
	private int type;   //活动类型 0刮刮乐 1 大转盘
	/** 当期开始时间 */
	private Date startDate;

	/** 当期结束时间 */
	private Date endDate;
	private String bgPath; //活动背景图
	private String basePath; //活动宣传图
	private BigDecimal virtualCurrency; //支付抽奖所需宝币，<=0：不支持支付抽奖 , >0: 支持支付抽奖

	@NotNull(groups = Save.class)
	@Min(0)
	@Digits(integer = 12, fraction = 3)
	@Column(nullable = false, precision = 27, scale = 12)
	public BigDecimal getVirtualCurrency() {
		return virtualCurrency;
	}

	public void setVirtualCurrency(BigDecimal virtualCurrency) {
		this.virtualCurrency = virtualCurrency;
	}

	@Column(nullable = false)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getBak() {
		return bak;
	}

	public void setBak(String bak) {
		this.bak = bak;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Column(nullable = false)
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@Column(nullable = false)
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getBgPath() {
		return bgPath;
	}

	public void setBgPath(String bgPath) {
		this.bgPath = bgPath;
	}

	public String getBasePath() {
		return basePath;
	}

	public void setBasePath(String basePath) {
		this.basePath = basePath;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
}